from tkinter import *
root = Tk()
root.title('Марафон. Этап 1')
root.geometry("500x500")
canvas = Canvas(bg = "white", width = 450, height = 450)
canvas.pack(anchor = CENTER, expand = 1)
x = int(input())
y = int(input())
k = int(input())
if x + 30 * k > 500 or y + 20 * k > 500 or x + 30 * k <  0 or y + 20 * k < 0 or x < 0 or y < 0:
    print("NO")
else:
    canvas.create_rectangle(x, y, x + 10*  k, y + 10 * k, fill = "blue", outline = "blue")
    
    canvas.create_rectangle(x, y + 10 * k, x + 30 * k, y + 20 * k, fill = "blue", outline = "blue")
    
    canvas.create_rectangle(x + 20 * k, y, x + 30 * k, y + 10 * k, fill = "blue", outline = "blue")
